#include <iostream>
#include <limits>
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::istream;
using std::string;

void test0(){
    int num = 10;
    cin >> num;
    cout << "num:" << num << endl;

    if(!cin.good()){
        //恢复流的状态
        cin.clear();
        //清空缓冲区
        cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n');
    }

    string line;
    cin >> line;
    cout << "line:" << line << endl;
}

int main(void){
    test0();
    return 0;
}
